﻿@page "/saleorders/index"
@attribute [Authorize]

<RadzenCard Variant="Variant.Filled" Style="height : 100%;">
    <CascadingValue Value="this" IsFixed="true">
        <DynamicComponent Type="_dynamicComponentType"></DynamicComponent>
    </CascadingValue>
</RadzenCard>

@code {
    private Type _dynamicComponentType = typeof(SaleOrderTable);
    private int _key = 0;

    public void SetDynamicComponentType(Type type)
    {
        _dynamicComponentType = type;
        StateHasChanged();
    }

    public void SetKey(int modelKey)
    {
        _key = modelKey;
    }

    public int GetKey()
    {
        return _key;
    }

}